<?php
// this check prevents access to debug front controllers that are deployed by accident to production servers.
// feel free to remove this, extend it, or make something more sophisticated.
/*if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
    '127.0.0.1',
    '::1',
))) {
    header('HTTP/1.0 403 Forbidden');
    die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}*/
   
define('ADMIN_USERNAME','carlos');     // Admin Username
define('ADMIN_PASSWORD','carlos');      // Admin Password

///////////////// Password protect ////////////////////////////////////////////////////////////////
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) ||
           (
        $_SERVER['PHP_AUTH_USER'] != ADMIN_USERNAME ||$_SERVER['PHP_AUTH_PW'] != ADMIN_PASSWORD
            )&&
        ($_SERVER['PHP_AUTH_USER'] != 'riki' ||$_SERVER['PHP_AUTH_PW'] != 'riki')
            ) {
            Header("WWW-Authenticate: Basic realm=\"HOLA, QUIEN SOS?\"");
            Header("HTTP/1.0 401 Unauthorized");

            echo <<<EOB
                <html><body>
                <h1>Que hace papa! me queres jaquiar???</h1>
                <big>Te eqibocaztes loquito!</big>
                </body></html>
EOB;
            exit;
}





require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';

use Symfony\Component\HttpFoundation\Request;

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$kernel->handle(Request::createFromGlobals())->send();